<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
    String path = request.getContextPath();
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="renderer" content="webkit">
        <title>博客系统</title>
        <meta name="keywords" content="">
        <meta name="description" content="">
        <!--[if lt IE 9]>
        <meta http-equiv="refresh" content="0;ie.html" />
        <![endif]-->
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/favicon.ico"> <link href="${pageContext.request.contextPath}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/css/animate.css" rel="stylesheet">
        <link href="${pageContext.request.contextPath}/css/style.css?v=4.1.0" rel="stylesheet">
        <!-- 引入样式文件和动态控制 -->
        <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
        <title>博客后台管理系统</title>
    </head>
    <script src="${pageContext.request.contextPath}/lay-ui/lib/layui-v2.6.3/layui.js"></script>
    <script type="text/javascript">
        function logout(){
            layer.confirm('您确定要提出系统吗？',{
                    btn:['是','否']
                },function (){
                    window.location.href="/web/admin/blogger/logout.do";
        })}
        function toFlush(){
            $.post("/web/admin/system/flushSystem.do",{},function(result){
                if(result.success){
                   alert("已成功刷新系统缓存！");
                }else{
                   alert("刷新系统缓存失败！");
                }
            },"json");
        }
    </script>


    <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden;background-color:rgba(255,255,255,0.4); " >
    <div id="wrapper" style="background-color: rgba(255,255,255,0.4)">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element">
                            <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                    <span class="block m-t-xs" style="font-size:18px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">欢迎&nbsp&nbsp${currentUser.userName }</strong>
                                    </span>
                                </span>
                            </a>
                        </div>
                        <div class="logo-element"> ${currentUser.userName }</div>
                    </li>
                    <c:if test="${currentUser.id!=0}">
                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                        <span class="ng-scope">大厅</span>
                    </li>
                    <li>
                        <%--                        <a class="J_menuItem" href="../../index_v1.jsp">--%>
                        <a class="J_menuItem" href="${pageContext.request.contextPath}/index/${currentUser.id}.htm">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">主页</span>
                        </a>
                    </li>
                    </c:if>
                    <c:if test="${currentUser.id!=0}">
                    <li class="line dk"></li>
                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                        <span class="ng-scope">博客</span>
                    </li>
                    <li>
                        <a class="J_menuItem" href="../manage/BlogManagement.jsp">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">我的博客</span>
                        </a>
                    </li>
                    <li>
                        <a class="J_menuItem" href="../manage/BlogTypeManage.jsp">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">博客类别管理</span>
                        </a>
                    </li>
                    <li>
                        <a class="J_menuItem" href="../manage/WriteBlog.jsp">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">写博客</span>
                        </a>
                    </li>

                    <li class="line dk"></li>
                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                        <span class="ng-scope">其他</span>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-picture-o"></i> <span class="nav-label">我的相册</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="../../htmlOther/basic_gallery.html">基本图库</a>
                            </li>
                            <li><a class="J_menuItem" href="../../htmlOther/carousel.html">图片切换</a>
                            </li>
                            <li><a class="J_menuItem" href="../../htmlOther/blueimp.html">Blueimp相册</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-cutlery"></i> <span class="nav-label">工具 </span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="../../htmlOther/form_builder.html">表单构建器</a>
                            </li>
                        </ul>
                    </li>
                    </c:if>
                    <c:if test="${currentUser.id==0}">
                    <li class="line dk"></li>
                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                        <span class="ng-scope">管理</span>
                    </li>
                    <li>
                        <a class="J_menuItem" href="../manage/BlogManagement.jsp">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">博文管理</span>
                        </a>
                    </li>
                    <li>
                        <a class="J_menuItem" href="../manage/BlogTypeManage.jsp">
                            <i class="fa fa-home"></i>
                            <span class="nav-label">博客类别管理</span>
                        </a>
                    </li>
                        <li>
                            <a class="J_menuItem" href="../manage/CommentManagement.jsp">
                                <i class="fa fa-home"></i>
                                <span class="nav-label">留言管理</span>
                            </a>
                        </li>

                    <li class="line dk"></li>
                    <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                        <span class="ng-scope">其他</span>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-picture-o"></i> <span class="nav-label">我的相册</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="../../htmlOther/basic_gallery.html">基本图库</a>
                            </li>
                            <li><a class="J_menuItem" href="../../htmlOther/carousel.html">图片切换</a>
                            </li>
                            <li><a class="J_menuItem" href="../../htmlOther/blueimp.html">Blueimp相册</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-cutlery"></i> <span class="nav-label">工具 </span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="../../htmlOther/form_builder.html">表单构建器</a>
                            </li>
                        </ul>
                    </li>
                    </c:if>
                </ul>
            </div>
        </nav>

        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1" >
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-info " href="#"><i class="fa fa-bars"></i> </a>
                        <form role="search" class="navbar-form-custom" method="post" action="../../htmlOther/search_results.html">
                            <div class="form-group">
                                <input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">
                            </div>
                        </form>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li>
                            <span ><font size="3pt">${currentUser.userName}&nbsp&nbsp欢迎您！ </font></span>
                        </li>
                        <li class="dropdown">
                            <a data-toggle="dropdown" href="main.jsp" onclick="if(confirm('您确定要刷新缓存吗？')){toFlush()}">
                                 <span class="label label-warning">刷新缓存</span>
                            </a>
                        </li>
                        <li class="dropdown">
                            <a  data-toggle="dropdown" href="#" onclick="logout()">
                                 <span class="label label-primary">退出系统</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        <!--左侧导航结束-->

            <div class="row J_mainContent" id="content-main" style="background-color: rgba(255,255,255,0.8)">
                <iframe  style="background-color: rgba(255,255,255,0.4)" id="J_iframe" width="100%" height="100%" <c:if test="${currentUser.id!=0}">
                         src="${pageContext.request.contextPath}/index/${currentUser.id}.htm"</c:if>
                        <c:if test="${currentUser.id==0}">
                            src="../manage/BlogManagement.jsp"
                        </c:if>
                         frameborder="0" data-id="index_v1.html" seamless></iframe>
            </div>

        </div>
        <!--右侧部分结束-->
    </div>

    <!-- 全局js -->
    <script src="${pageContext.request.contextPath}/js/jquery.min.js?v=2.1.4"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${pageContext.request.contextPath}/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="${pageContext.request.contextPath}/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <script src="${pageContext.request.contextPath}/js/hAdmin.js?v=4.1.0"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/index.js"></script>

    <!-- 第三方插件 -->
    <script src="${pageContext.request.contextPath}/js/plugins/pace/pace.min.js"></script>
    </body>
</html>